/* =========================================================
   ALNA VITALITY × LEADHUB
   DESKTOP + MOBIL
   ========================================================= */


/* =========================================================
   1. DÁREK – POUZE SKUTEČNÝ LEADHUB
   Timing zobrazení řídí LeadHub.
   ========================================================= */

.LEAD_GENERATION {
    box-sizing: border-box !important;

    position: fixed !important;
    right: 28px !important;
    bottom: 28px !important;
    left: auto !important;
    top: auto !important;

    width: 84px !important;
    height: 84px !important;

    min-width: 84px !important;
    max-width: 84px !important;
    min-height: 84px !important;
    max-height: 84px !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    background: transparent !important;

    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;

    overflow: visible !important;

    opacity: 1 !important;

    pointer-events: auto !important;
    cursor: pointer !important;

    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;

    z-index: 999998 !important;
}


/* skutečný LeadHub trigger */

.LEAD_GENERATION > span:first-child {
    box-sizing: border-box !important;

    position: absolute !important;
    inset: 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 84px !important;
    height: 84px !important;

    min-width: 84px !important;
    min-height: 84px !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    border-radius: 50% !important;

    background: #f5ede5 !important;

    color: transparent !important;

    font-size: 0 !important;
    line-height: 0 !important;

    opacity: 1 !important;

    overflow: hidden !important;

    cursor: pointer !important;
    pointer-events: auto !important;

    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;

    box-shadow:
        0 9px 25px rgba(0, 0, 0, .17),
        0 0 0 11px rgba(199, 178, 159, .23) !important;

    z-index: 5 !important;

    transition:
        transform .2s ease,
        box-shadow .2s ease !important;
}


/* ikonka */

.LEAD_GENERATION > span:first-child::before {
    content: "🎁";

    position: absolute !important;
    inset: 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 100% !important;
    height: 100% !important;

    color: initial !important;

    font-size: 32px !important;
    line-height: 1 !important;

    pointer-events: none !important;

    z-index: 1 !important;
}


/* původní klikací trigger LeadHubu */

.LEAD_GENERATION > span:first-child > span {
    box-sizing: border-box !important;

    position: absolute !important;
    inset: 0 !important;

    display: block !important;

    width: 100% !important;
    height: 100% !important;

    min-width: 100% !important;
    min-height: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;

    color: transparent !important;

    font-size: 0 !important;
    line-height: 0 !important;

    opacity: .01 !important;

    cursor: pointer !important;
    pointer-events: auto !important;

    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;

    z-index: 10 !important;
}


/* původní X teaseru */

.LEAD_GENERATION > span:last-child:not(:first-child) {
    display: none !important;
}


/* hover pouze desktop */

@media (hover: hover) and (pointer: fine) {

    .LEAD_GENERATION > span:first-child:hover {
        transform: translateY(-2px) scale(1.04) !important;

        box-shadow:
            0 13px 30px rgba(0, 0, 0, .19),
            0 0 0 14px rgba(199, 178, 159, .19) !important;
    }
}


/* =========================================================
   2. DESKTOP POPUP
   ========================================================= */

body > div > div:has(> input[placeholder*="mail" i]):has(> button) {
    box-sizing: border-box !important;

    position: fixed !important;

    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;

    transform: translate(-50%, -50%) !important;

    width: min(1120px, calc(100vw - 60px)) !important;
    max-width: 1120px !important;

    height: 600px !important;

    min-height: 0 !important;
    max-height: calc(100vh - 50px) !important;

    margin: 0 !important;

    /* 54 % obsah / 46 % foto */

    padding:
        65px
        calc(46% + 34px)
        42px
        58px !important;

    background: #f4eee8 !important;

    border: 0 !important;
    border-radius: 24px !important;

    overflow: hidden !important;

    color: #342f2a !important;

    box-shadow:
        0 30px 90px rgba(0,0,0,.27) !important;

    z-index: 9999999 !important;
}


/* =========================================================
   3. FOTKA DESKTOP
   ========================================================= */

body > div > div:has(> input[placeholder*="mail" i]):has(> button)::after {
    content: "";

    position: absolute;

    top: 0;
    right: 0;

    width: 46%;
    height: 100%;

    background-color: #ece3d9;

    background-image:
        url("https://www.alnavitality.cz/user/documents/upload/Popupalna.png") !important;

    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;

    z-index: 0;
}


/* obsah nad fotkou */

body > div > div:has(> input[placeholder*="mail" i]):has(> button)
> * {
    position: relative !important;
    z-index: 2 !important;
}


/* =========================================================
   4. TITLE
   ========================================================= */

body > div > div:has(> input[placeholder*="mail" i]):has(> button)
> div:nth-of-type(1) {
    display: flex !important;
    flex-direction: column !important;

    max-width: 500px !important;

    margin: 0 0 24px !important;
    padding: 0 !important;

    color: #302b27 !important;

    font-size: 0 !important;
    line-height: 0 !important;
}


body > div > div:has(> input[placeholder*="mail" i]):has(> button)
> div:nth-of-type(1)
> * {
    display: none !important;
}


/* kicker */

body > div > div:has(> input[placeholder*="mail" i]):has(> button)
> div:nth-of-type(1)::before {
    content: "DÁREK NA UVÍTANOU";

    display: block;

    order: 1;

    margin: 0 0 15px;

    color: #9a8069;

    font-family: inherit;

    font-size: 12px;
    line-height: 1;

    font-weight: 700;

    letter-spacing: 1.6px;
}


/* headline */

body > div > div:has(> input[placeholder*="mail" i]):has(> button)
> div:nth-of-type(1)::after {
    content: "150 Kč na váš první nákup";

    display: block;

    order: 2;

    max-width: 500px;

    color: #302b27;

    font-family: inherit;

    font-size: 44px;
    line-height: 1.07;

    font-weight: 700;

    letter-spacing: -.8px;
}


/* =========================================================
   5. POPISEK
   ========================================================= */

body > div > div:has(> input[placeholder*="mail" i]):has(> button)
> div:nth-of-type(2) {
    margin: 0 0 28px !important;
    padding: 0 !important;

    font-size: 0 !important;
    line-height: 0 !important;
}


body > div > div:has(> input[placeholder*="mail" i]):has(> button)
> div:nth-of-type(2)
> * {
    display: none !important;
}


body > div > div:has(> input[placeholder*="mail" i]):has(> button)
> div:nth-of-type(2)::before {
    content:
        "Zanechte nám svůj e-mail a pošleme vám dárkový poukaz v hodnotě 150 Kč.";

    display: block;

    max-width: 470px;

    color: #5f574f;

    font-family: inherit;

    font-size: 16px;
    line-height: 1.5;

    font-weight: 400;
}


/* =========================================================
   6. INPUTY
   ========================================================= */

body > div > div:has(> input[placeholder*="mail" i]):has(> button)
> input {
    box-sizing: border-box !important;

    display: block !important;

    width: 100% !important;
    max-width: none !important;

    height: 54px !important;

    margin: 0 0 11px !important;

    padding: 0 20px !important;

    background: #fff !important;

    border: 1.5px solid #cdbba9 !important;
    border-radius: 999px !important;

    color: #342f2a !important;

    font-family: inherit !important;
    font-size: 15px !important;

    box-shadow: none !important;
    outline: none !important;

    transition:
        border-color .2s ease,
        box-shadow .2s ease !important;
}


body > div > div:has(> input[placeholder*="mail" i]):has(> button)
> input:focus {
    border-color: #9fc53d !important;

    box-shadow:
        0 0 0 3px rgba(159,197,61,.10) !important;
}


body > div > div:has(> input[placeholder*="mail" i]):has(> button)
> input::placeholder {
    color: #978d84 !important;
    opacity: 1 !important;
}


/* =========================================================
   7. CTA
   ========================================================= */

body > div > div:has(> input[placeholder*="mail" i]):has(> button)
> button {
    box-sizing: border-box !important;

    display: block !important;

    width: 100% !important;
    max-width: none !important;

    height: 54px !important;

    margin: 3px 0 0 !important;

    padding: 0 20px !important;

    border: 0 !important;
    border-radius: 999px !important;

    background: #9fc53d !important;

    color: #fff !important;

    font-family: inherit !important;
    font-size: 16px !important;

    font-weight: 700 !important;

    cursor: pointer !important;

    box-shadow: none !important;

    transition:
        background .2s ease,
        transform .2s ease !important;
}


body > div > div:has(> input[placeholder*="mail" i]):has(> button)
> button:hover {
    background: #90b635 !important;
    transform: translateY(-1px);
}


/* =========================================================
   8. GDPR
   ========================================================= */

body > div > div:has(> input[placeholder*="mail" i]):has(> button)
> div:last-of-type {
    margin: 15px 0 0 !important;

    padding: 0 !important;

    color: #91877e !important;

    font-size: 10.5px !important;
    line-height: 1.4 !important;

    text-align: left !important;
}


body > div > div:has(> input[placeholder*="mail" i]):has(> button)
> div:last-of-type
* {
    font-size: inherit !important;
}


/* =========================================================
   9. X
   ========================================================= */

body > div > div:has(> input[placeholder*="mail" i]):has(> button)
> span:first-child {
    box-sizing: border-box !important;

    position: absolute !important;

    top: 18px !important;
    right: 18px !important;

    width: 42px !important;
    height: 42px !important;

    display: flex !important;

    align-items: center !important;
    justify-content: center !important;

    margin: 0 !important;
    padding: 0 !important;

    border-radius: 50% !important;

    background:
        rgba(255,255,255,.82) !important;

    color: #3f3934 !important;

    font-size: 22px !important;
    line-height: 1 !important;

    cursor: pointer !important;

    z-index: 10 !important;
}


/* =========================================================
   10. MOBIL
   ========================================================= */

@media (max-width: 800px) {

    /* =====================================================
       DÁREK – MOBIL
       Pořád skutečný LeadHub trigger, jen větší.
       ===================================================== */

    .LEAD_GENERATION {
        right: 18px !important;
        bottom: calc(22px + env(safe-area-inset-bottom)) !important;

        width: 76px !important;
        height: 76px !important;

        min-width: 76px !important;
        max-width: 76px !important;

        min-height: 76px !important;
        max-height: 76px !important;

        padding: 0 !important;
        margin: 0 !important;

        background: transparent !important;

        border: 0 !important;

        overflow: visible !important;

        opacity: 1 !important;

        pointer-events: auto !important;
        cursor: pointer !important;

        touch-action: manipulation !important;
        -webkit-tap-highlight-color: transparent !important;
    }


    .LEAD_GENERATION > span:first-child {
        position: absolute !important;
        inset: 0 !important;

        width: 76px !important;
        height: 76px !important;

        min-width: 76px !important;
        max-width: 76px !important;

        min-height: 76px !important;
        max-height: 76px !important;

        margin: 0 !important;
        padding: 0 !important;

        border: 0 !important;
        border-radius: 50% !important;

        background: #f5ede5 !important;

        box-shadow:
            0 8px 23px rgba(0,0,0,.16),
            0 0 0 7px rgba(199,178,159,.19) !important;

        overflow: hidden !important;

        opacity: 1 !important;

        pointer-events: auto !important;
        cursor: pointer !important;

        touch-action: manipulation !important;
        -webkit-tap-highlight-color: transparent !important;
    }


    .LEAD_GENERATION > span:first-child::before {
        content: "🎁";

        position: absolute !important;
        inset: 0 !important;

        display: flex !important;
        align-items: center !important;
        justify-content: center !important;

        width: 100% !important;
        height: 100% !important;

        font-size: 32px !important;
        line-height: 1 !important;

        pointer-events: none !important;
    }


    .LEAD_GENERATION > span:first-child > span {
        position: absolute !important;
        inset: 0 !important;

        display: block !important;

        width: 100% !important;
        height: 100% !important;

        min-width: 100% !important;
        min-height: 100% !important;

        margin: 0 !important;
        padding: 0 !important;

        background: transparent !important;

        border: 0 !important;

        box-shadow: none !important;

        opacity: .01 !important;

        pointer-events: auto !important;
        cursor: pointer !important;

        touch-action: manipulation !important;
        -webkit-tap-highlight-color: transparent !important;

        z-index: 10 !important;
    }


    /* =====================================================
       POPUP – MOBIL
       ===================================================== */

    body > div > div:has(> input[placeholder*="mail" i]):has(> button) {
        box-sizing: border-box !important;

        position: fixed !important;

        top: 50% !important;
        left: 50% !important;

        right: auto !important;
        bottom: auto !important;

        transform: translate(-50%, -50%) !important;

        width: calc(100vw - 30px) !important;
        max-width: 390px !important;

        height: auto !important;

        min-height: 0 !important;
        max-height: calc(100dvh - 30px) !important;

        margin: 0 !important;

        padding:
            180px
            22px
            22px !important;

        background: #f4eee8 !important;

        border-radius: 20px !important;

        overflow-x: hidden !important;
        overflow-y: auto !important;

        -webkit-overflow-scrolling: touch !important;

        box-shadow:
            0 22px 55px rgba(0,0,0,.25) !important;
    }


    /* =====================================================
       MOBILNÍ HORIZONTÁLNÍ FOTKA
       Žádný fallback na vertikální fotku.
       ===================================================== */

    body > div > div:has(> input[placeholder*="mail" i]):has(> button)::after {
        display: block !important;

        content: "" !important;

        position: absolute !important;

        top: 0 !important;
        left: 0 !important;
        right: auto !important;

        width: 100% !important;
        height: 160px !important;

        background-color: #ece3d9 !important;

        background-image:
            url("https://www.alnavitality.cz/user/documents/upload/Popupalna-mobile.png") !important;

        background-size: cover !important;
        background-position: center center !important;
        background-repeat: no-repeat !important;

        border-radius:
            20px 20px 0 0 !important;

        z-index: 0 !important;
    }


    /* =====================================================
       KICKER + TITLE
       ===================================================== */

    body > div > div:has(> input[placeholder*="mail" i]):has(> button)
    > div:nth-of-type(1) {
        max-width: none !important;

        margin: 0 0 14px !important;
    }


    body > div > div:has(> input[placeholder*="mail" i]):has(> button)
    > div:nth-of-type(1)::before {
        margin: 0 0 8px !important;

        color: #9a8069 !important;

        font-size: 9px !important;
        line-height: 1 !important;

        font-weight: 700 !important;

        letter-spacing: 1.4px !important;
    }


    body > div > div:has(> input[placeholder*="mail" i]):has(> button)
    > div:nth-of-type(1)::after {
        max-width: 310px !important;

        color: #302b27 !important;

        font-size: 26px !important;
        line-height: 1.05 !important;

        font-weight: 700 !important;

        letter-spacing: -.4px !important;
    }


    /* =====================================================
       TEXT
       ===================================================== */

    body > div > div:has(> input[placeholder*="mail" i]):has(> button)
    > div:nth-of-type(2) {
        margin: 0 0 16px !important;
    }


    body > div > div:has(> input[placeholder*="mail" i]):has(> button)
    > div:nth-of-type(2)::before {
        max-width: none !important;

        color: #5f574f !important;

        font-size: 13px !important;
        line-height: 1.42 !important;
    }


    /* =====================================================
       INPUTY
       ===================================================== */

    body > div > div:has(> input[placeholder*="mail" i]):has(> button)
    > input {
        box-sizing: border-box !important;

        width: 100% !important;

        height: 45px !important;

        margin: 0 0 8px !important;

        padding: 0 16px !important;

        border-width: 1px !important;
        border-radius: 999px !important;

        font-size: 14px !important;
    }


    /* =====================================================
       CTA
       ===================================================== */

    body > div > div:has(> input[placeholder*="mail" i]):has(> button)
    > button {
        width: 100% !important;

        height: 46px !important;

        margin: 2px 0 0 !important;

        border-radius: 999px !important;

        font-size: 14px !important;
    }


    /* =====================================================
       GDPR
       ===================================================== */

    body > div > div:has(> input[placeholder*="mail" i]):has(> button)
    > div:last-of-type {
        margin: 10px 0 0 !important;

        color: #9a9189 !important;

        font-size: 8.5px !important;
        line-height: 1.3 !important;
    }


    /* =====================================================
       X
       ===================================================== */

    body > div > div:has(> input[placeholder*="mail" i]):has(> button)
    > span:first-child {
        top: 9px !important;
        right: 9px !important;

        width: 34px !important;
        height: 34px !important;

        background:
            rgba(255,255,255,.92) !important;

        font-size: 18px !important;
    }
}
/* =========================================================
   FINÁLNÍ DOLADĚNÍ DÁRKU – MOBIL
   ========================================================= */

@media (max-width: 800px) {

    /* celý LeadHub wrapper – bez hranatého pozadí/stínu */

    .LEAD_GENERATION {
        right: 4px !important;

        background: transparent !important;

        border: 0 !important;
        outline: 0 !important;

        box-shadow: none !important;
        filter: none !important;

        border-radius: 0 !important;

        -webkit-tap-highlight-color: transparent !important;
    }


    /* samotné kolečko – jediné, co má být vidět */

    .LEAD_GENERATION > span:first-child {
        background: #f5ede5 !important;

        border: 0 !important;
        outline: 0 !important;

        border-radius: 50% !important;

        box-shadow:
            0 8px 23px rgba(0,0,0,.16),
            0 0 0 7px rgba(199,178,159,.19) !important;

        -webkit-tap-highlight-color: transparent !important;
    }


    /* neviditelný klikací LeadHub prvek
       nesmí dělat žádný čtverec */

    .LEAD_GENERATION > span:first-child > span {
        background: transparent !important;

        border: 0 !important;
        outline: 0 !important;

        box-shadow: none !important;
        filter: none !important;

        -webkit-appearance: none !important;
        appearance: none !important;

        -webkit-tap-highlight-color: transparent !important;
    }
}